package com.ruoyi.report_jl.domain.vo;

import java.math.BigDecimal;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
import com.ruoyi.common.annotation.ExcelDictFormat;
import com.ruoyi.common.convert.ExcelDictConvert;
import com.ruoyi.common.utils.BigDecimalUtil;
import lombok.Data;
import java.util.Date;



/**
 * 细集料压碎指标记录-详情视图对象 report_jl_xjlyszbjlb_ba_detail
 *
 * @author tll
 * @date 2024-07-31
 */
@Data
@ExcelIgnoreUnannotated
public class ReportJlXjlyszbjlbBaDetailVo {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ExcelProperty(value = "id")
    private Long detailId;

    /**
     * 主表id
     */
    @ExcelProperty(value = "主表id")
    private Long excelId;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 筛孔粒径范围（mm）
     */
    @ExcelProperty(value = "筛孔粒径范围", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "m=m")
    private String shaiklj;

    /**
     * 单粒级试样质量（g）
     */
    @ExcelProperty(value = "单粒级试样质量", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "g=")
    private BigDecimal zhilmg;

    /**
     * 试样的筛余量m1（g）
     */
    @ExcelProperty(value = "试样的筛余量m1", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "g=")
    private BigDecimal shaiyl;

    /**
     * 试样的通过量m2（g）
     */
    @ExcelProperty(value = "试样的通过量m2", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "g=")
    private BigDecimal tonggl;

    /**
     * 该粒级压碎指标（％）
     */
    @ExcelProperty(value = "该粒级压碎指标", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "％=")
    private BigDecimal yaszb;

    /**
     * 该粒级压碎指标平均值（％）
     */
    @ExcelProperty(value = "该粒级压碎指标平均值", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "％=")
    private BigDecimal lijPjz;

    /**
     * 细集料的压碎指标（％）
     */
    @ExcelProperty(value = "细集料的压碎指标", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "％=")
    private BigDecimal xijlYszb;

    public void setZhilmg(BigDecimal zhilmg) {
        this.zhilmg = BigDecimalUtil.stpTrailZero(zhilmg);
    }

    public void setShaiyl(BigDecimal shaiyl) {
        this.shaiyl = BigDecimalUtil.stpTrailZero(shaiyl);
    }

    public void setTonggl(BigDecimal tonggl) {
        this.tonggl = BigDecimalUtil.stpTrailZero(tonggl);
    }

    public void setYaszb(BigDecimal yaszb) {
        this.yaszb = ObjectUtils.isNotEmpty(BigDecimalUtil.stpTrailZero(yaszb))
            ? BigDecimalUtil.stpTrailZero(yaszb).setScale(0, BigDecimal.ROUND_HALF_UP)
            : null;
    }

    public void setLijPjz(BigDecimal lijPjz) {
        this.lijPjz = ObjectUtils.isNotEmpty(BigDecimalUtil.stpTrailZero(lijPjz))
            ? BigDecimalUtil.stpTrailZero(lijPjz).setScale(0, BigDecimal.ROUND_HALF_UP)
            : null;
    }

    public void setXijlYszb(BigDecimal xijlYszb) {
        this.xijlYszb = ObjectUtils.isNotEmpty(BigDecimalUtil.stpTrailZero(xijlYszb))
            ? BigDecimalUtil.stpTrailZero(xijlYszb).setScale(0, BigDecimal.ROUND_HALF_UP)
            : null;
    }
}
